1 00:00:00,080 --> 00:00:00,770 Hey there. 2 00:00:00,770 --> 00:00:01,940 Welcome back. 3 00:00:01,940 --> 00:00:08,930 In this lecture we're going to be discussing a new type of script called a module script. 4 00:00:08,960 --> 00:00:17,030 A module script is a type of Lua source container that runs once and must return exactly one value. 5 00:00:17,030 --> 00:00:22,370 This value is then returned by a call to the require function. 6 00:00:22,370 --> 00:00:25,190 Given the module script as the only argument. 7 00:00:25,190 --> 00:00:32,420 Module scripts run once and only once per Lua environment and return the exact same value for subsequent 8 00:00:32,420 --> 00:00:34,190 calls to require. 9 00:00:34,190 --> 00:00:39,320 Module scripts are essential objects for adhering to the don't repeat yourself principle. 10 00:00:39,320 --> 00:00:43,640 When you write a function, write it only once and use it everywhere. 11 00:00:43,640 --> 00:00:48,770 Having multiple copies of a function is disastrous when you need to change that behavior. 12 00:00:48,770 --> 00:00:54,700 So you should define functions or groups of functions in module scripts and have your scripts and local 13 00:00:54,700 --> 00:00:57,460 scripts call require on your module scripts. 14 00:00:57,460 --> 00:01:00,970 Keep your code organized so as roadblocks themselves. 15 00:01:00,970 --> 00:01:07,360 State module scripts are important tools for making your code more organized, sustainable, and it 16 00:01:07,360 --> 00:01:10,360 helps you to avoid copy and pasting code all over the place. 17 00:01:10,360 --> 00:01:16,630 As the name suggests, you can basically think of a module script as some kind of shareable module that 18 00:01:16,630 --> 00:01:20,230 you can, like, plug into other scripts to provide more features. 19 00:01:20,230 --> 00:01:26,560 Now, one statement you might be confused on is the statement that module scripts run once and only 20 00:01:26,560 --> 00:01:29,290 once per Lua environment. 21 00:01:29,290 --> 00:01:31,600 What is a Lua environment? 22 00:01:31,600 --> 00:01:39,340 Well, that would basically be a fancy name for the scope or the context the Lua interpreter creates 23 00:01:39,340 --> 00:01:41,170 when executing code in your game. 24 00:01:41,170 --> 00:01:44,590 There are multiple environments in Roblox. 25 00:01:44,590 --> 00:01:50,380 For example, every single script in your game has its own environment for local variables. 26 00:01:50,380 --> 00:01:54,490 You can't share those local variables across different scripts. 27 00:01:54,490 --> 00:01:58,000 Other scripts can't access it because they're not in the same environment. 28 00:01:58,000 --> 00:02:04,630 But all scripts in the game also share a global environment for sharing global variables. 29 00:02:04,630 --> 00:02:10,260 You can basically think of it as two different biomes on Earth, like a desert and a forest. 30 00:02:10,260 --> 00:02:15,450 Each of them are their own environment, yet both of them share the same global environment, which 31 00:02:15,450 --> 00:02:16,590 is the planet Earth. 32 00:02:16,590 --> 00:02:19,890 Now, the only exception to this run once and only once. 33 00:02:19,890 --> 00:02:26,880 Fact is, if you have code executing and what we call parallel, which means that multiple processor 34 00:02:26,880 --> 00:02:30,330 threads are executing code at the exact same time. 35 00:02:30,330 --> 00:02:35,460 This is a much more advanced topic we don't discuss until much later in the course. 36 00:02:35,460 --> 00:02:41,910 So your main takeaway here should be that module scripts run once when they are first required, and 37 00:02:41,910 --> 00:02:48,390 then they'll return the same value for any future calls to the require function. 38 00:02:48,390 --> 00:02:53,430 They don't run the code inside of them again every single time you call the require function. 39 00:02:53,640 --> 00:02:58,980 So inside of studio let's go ahead and create a brand new module script. 40 00:02:58,980 --> 00:03:04,050 I'll just place mine in server Script service so we can search for a module script. 41 00:03:04,050 --> 00:03:04,980 Here it is. 42 00:03:04,980 --> 00:03:06,930 There's our beautiful module script. 43 00:03:06,930 --> 00:03:11,940 And inside of our module script you're going to notice some default code inside of here. 44 00:03:11,940 --> 00:03:14,400 And as you can see it's returning a table. 45 00:03:14,400 --> 00:03:19,620 And as we read in the documentation a module script has to return exactly one value. 46 00:03:19,620 --> 00:03:22,820 Now that one value could actually be anything. 47 00:03:22,820 --> 00:03:28,730 Most commonly it's going to be a table, but other times you may have module scripts that return functions, 48 00:03:28,730 --> 00:03:30,200 or maybe other data types. 49 00:03:30,200 --> 00:03:34,130 You aren't limited to what exactly you can return from a module script. 50 00:03:34,130 --> 00:03:37,130 It just has to be one value that you return. 51 00:03:37,130 --> 00:03:42,590 Now, the first claim I want to test in the documentation is that module scripts only run once, even 52 00:03:42,590 --> 00:03:46,010 if you call the require function on it multiple different times. 53 00:03:46,010 --> 00:03:55,160 So what we're going to do is we're just going to print inside of the module script, the module executed. 54 00:03:56,630 --> 00:03:59,900 And then let's go ahead and run our game. 55 00:04:00,470 --> 00:04:04,370 And what you're going to notice is that nothing prints inside of the console. 56 00:04:04,370 --> 00:04:04,940 Why is that. 57 00:04:04,940 --> 00:04:12,030 Well silly me, we need to require the module script because right now it's just acting as a container 58 00:04:12,030 --> 00:04:17,550 of code, and it's not doing anything with it for this code inside of the module to actually execute. 59 00:04:17,580 --> 00:04:22,680 We need to have either a local script or a server script require the module. 60 00:04:22,680 --> 00:04:26,760 So let's add in a server script into the server script service. 61 00:04:26,760 --> 00:04:29,550 And let's go ahead and require our module script. 62 00:04:29,670 --> 00:04:32,610 So we could call this module. 63 00:04:32,610 --> 00:04:35,080 And that's going to be equal to. 64 00:04:35,080 --> 00:04:40,720 And the fastest way I can reference this module script is I can just do script dot parent dot module 65 00:04:40,720 --> 00:04:41,290 script. 66 00:04:41,290 --> 00:04:46,150 And then we need to use that function they talked about in the documentation called require. 67 00:04:46,150 --> 00:04:47,800 And this is a global function. 68 00:04:47,920 --> 00:04:51,190 And we need to pass it the module script itself. 69 00:04:51,190 --> 00:04:56,710 And it's going to return us one value which is the value stored inside of the module script. 70 00:04:56,710 --> 00:04:59,050 In this case that's our empty table. 71 00:04:59,320 --> 00:05:06,970 So let's go ahead and call require and let's pass it our module script. 72 00:05:06,970 --> 00:05:11,560 So now what's stored in this variable is going to be our empty table. 73 00:05:11,560 --> 00:05:16,270 And to confirm that let's just go ahead and print this variable into the console. 74 00:05:16,270 --> 00:05:20,530 Now if we go ahead and run our game what you're going to see is that the module executed. 75 00:05:20,530 --> 00:05:24,280 And as you can see there is our empty table stored inside of our variable. 76 00:05:24,280 --> 00:05:24,940 Very cool. 77 00:05:24,940 --> 00:05:26,710 Now let's do something a little bit fun. 78 00:05:26,710 --> 00:05:29,560 Let's try requiring the module script again. 79 00:05:29,560 --> 00:05:32,290 So we'll do module is equal to require. 80 00:05:32,290 --> 00:05:34,960 And let's just do the exact same thing. 81 00:05:34,960 --> 00:05:38,890 And let's see if this print statement right here executes more than once. 82 00:05:38,890 --> 00:05:43,000 So if we run the game well why won't you take a look at that. 83 00:05:43,000 --> 00:05:46,270 It only printed once and we still have our empty table. 84 00:05:46,270 --> 00:05:52,680 So their claims are true, even though we called the require function twice on our module script. 85 00:05:52,680 --> 00:05:55,680 This print statement right here only executed once. 86 00:05:55,980 --> 00:05:58,950 Now let me show you a useful feature of module scripts. 87 00:05:58,950 --> 00:06:03,990 And one of those useful features is the ability to share functions across multiple different scripts. 88 00:06:03,990 --> 00:06:10,350 So we can go ahead and actually store a function within the table that gets returned from our module. 89 00:06:10,350 --> 00:06:14,550 And the syntax to do that is we're first going to use the function keyword. 90 00:06:14,550 --> 00:06:19,890 Then we need to reference the table that we're going to store the function in which is just called module. 91 00:06:19,890 --> 00:06:21,720 And then we need to put a dot. 92 00:06:21,720 --> 00:06:25,590 And what comes after the dot is going to be the name of our function. 93 00:06:25,590 --> 00:06:29,310 I'm just going to call this example function. 94 00:06:29,310 --> 00:06:34,380 And we'll put our two parentheses and then hit enter to create our end keyword. 95 00:06:34,380 --> 00:06:37,410 So this is our new function scope right here. 96 00:06:37,500 --> 00:06:40,920 And now we have created a function that exists within our module. 97 00:06:40,920 --> 00:06:45,990 So if we actually go back to our script here let me delete this redundant line. 98 00:06:46,650 --> 00:06:49,890 And then let me go ahead and just index my module. 99 00:06:49,890 --> 00:06:53,070 What you're going to see is my example function appears right here. 100 00:06:53,070 --> 00:06:57,240 It tells us it's a function that takes no parameters and returns nothing. 101 00:06:57,240 --> 00:07:01,170 And I'm able to call this function within my script. 102 00:07:01,170 --> 00:07:07,070 And the cool thing about this is that I can actually call this function as many times as I'd like. 103 00:07:07,070 --> 00:07:13,070 And inside of this function, let's just go ahead and print the function executed. 104 00:07:14,330 --> 00:07:18,710 So if we go ahead and run the game now, what you're going to see is that when we first required our 105 00:07:18,710 --> 00:07:21,020 module, it prints the module executed. 106 00:07:21,020 --> 00:07:26,360 But every single time we call the function, it printed four different times because we called it four 107 00:07:26,360 --> 00:07:27,350 different times. 108 00:07:27,470 --> 00:07:34,250 Another great feature of module scripts is the ability to share data across multiple scripts. 109 00:07:34,250 --> 00:07:40,220 So when one script, for example, let's say this script makes a change to the module, any other scripts 110 00:07:40,220 --> 00:07:43,910 that have required the module are also going to observe that change. 111 00:07:43,910 --> 00:07:49,160 So let's say inside of my module I had a variable like let's say there's a variable in this table. 112 00:07:49,160 --> 00:07:50,360 Let's make one real quick. 113 00:07:50,370 --> 00:07:52,620 We can do module dot. 114 00:07:52,620 --> 00:07:54,450 Uh let's call the variable hello. 115 00:07:54,540 --> 00:07:56,640 And let's set it equal to a value of ten. 116 00:07:56,640 --> 00:07:57,000 Whatever. 117 00:07:57,000 --> 00:08:05,520 Just for this example inside of this script, let's just go ahead and print out what module Dot hello 118 00:08:05,520 --> 00:08:08,790 is, which is going to print ten. 119 00:08:09,240 --> 00:08:16,900 And then let's wait um, let's say one second and then let's print it again. 120 00:08:17,110 --> 00:08:22,360 And this time, what I'm going to do is I'm going to create another script inside of server script service. 121 00:08:22,510 --> 00:08:25,360 This one's also going to require my module. 122 00:08:25,360 --> 00:08:29,620 So let me just copy the code in here and put it in my new script in my new script. 123 00:08:29,620 --> 00:08:39,280 And this time what I want this module to do is I'm going to have it wait for, let's say 0.1 seconds 124 00:08:39,910 --> 00:08:48,070 and then we're going to print, and then we're going to set module dot hello equal to 20 instead. 125 00:08:48,070 --> 00:08:53,530 So that way the timing is correct because I don't know which one of these scripts is going to execute 126 00:08:53,530 --> 00:08:54,160 first. 127 00:08:54,160 --> 00:08:58,240 This one might execute first or this one might execute first. 128 00:08:58,240 --> 00:09:00,460 If I didn't have this yield statement here. 129 00:09:00,940 --> 00:09:05,870 And let's say this script executed first, well it's going to immediately update the value inside of 130 00:09:05,870 --> 00:09:06,770 my module. 131 00:09:06,770 --> 00:09:11,150 And then when this script runs it's already going to observe that change. 132 00:09:11,150 --> 00:09:13,850 So it'll print 20 here and then it'll print 20 here. 133 00:09:13,850 --> 00:09:17,630 Again because this script already made the change to that variable. 134 00:09:17,630 --> 00:09:23,240 So we're just going to wait for 0.1 seconds before we make the change. 135 00:09:23,240 --> 00:09:27,770 That way this script has the opportunity to print the original value out which is ten. 136 00:09:27,770 --> 00:09:35,820 So if we run our script module executed, it prints ten, and then it waits one second and then it prints 137 00:09:35,820 --> 00:09:36,450 20. 138 00:09:36,450 --> 00:09:42,540 So as you can see, even though these are two different scripts, this script was able to observe the 139 00:09:42,540 --> 00:09:47,100 change made to the hello variable, even though this other script made that change. 140 00:09:47,100 --> 00:09:51,420 And that's because we can share data across scripts using module scripts. 141 00:09:51,450 --> 00:09:58,350 Another important thing to note about observing changes made to values inside of module scripts is that 142 00:09:58,350 --> 00:10:05,730 those changes can only be observed if the scripts are of the same type, and the scripts exist on the 143 00:10:05,730 --> 00:10:07,140 same computer. 144 00:10:07,170 --> 00:10:13,590 So, for example, if a server script were to make a change to my module script, and then let's say 145 00:10:13,590 --> 00:10:19,470 a local script also required that module script, that local script is not going to be able to observe 146 00:10:19,470 --> 00:10:21,270 the changes made by the server script. 147 00:10:21,270 --> 00:10:26,730 And if the local script makes any changes, the server will not be able to observe any of those changes. 148 00:10:26,760 --> 00:10:32,370 To prove this, let's go ahead and migrate our module script into replicated storage. 149 00:10:32,790 --> 00:10:37,140 Let me go ahead and get rid of this script because I do not need it right now. 150 00:10:38,070 --> 00:10:41,640 And now let's go ahead and update our reference to our module script. 151 00:10:41,670 --> 00:10:46,740 So I'm just going to do game dot replicated storage and get my module script so I can require it. 152 00:10:47,790 --> 00:10:53,940 And then what I'm going to do is I'm going to just wait, uh, let's say six seconds and I'm just going 153 00:10:53,940 --> 00:10:57,330 to print what the value of hello is going to be. 154 00:10:57,330 --> 00:11:02,100 And then what I'm going to do next is I'm going to create a new script inside of starter player scripts. 155 00:11:02,100 --> 00:11:04,230 This is going to be my local script. 156 00:11:04,230 --> 00:11:07,910 And this local script is also going to require my module. 157 00:11:07,910 --> 00:11:12,110 So I'm going to do game dot replicated storage dot module script. 158 00:11:14,060 --> 00:11:19,040 And let's go ahead and update the value of hello to uh 20. 159 00:11:20,450 --> 00:11:23,450 Now let me go ahead and play test the game. 160 00:11:23,750 --> 00:11:24,830 So we'll do play. 161 00:11:24,830 --> 00:11:26,450 So that way my client comes in. 162 00:11:27,050 --> 00:11:33,020 If you take a look at that the print statement executed twice once by the server, once by the client, 163 00:11:33,020 --> 00:11:38,510 and then it printed ten on the server, even though the client updated the value inside of the module 164 00:11:38,510 --> 00:11:39,230 to 20. 165 00:11:39,260 --> 00:11:45,500 That's because, as I said, the changes to the module script are not observed across the client server 166 00:11:45,500 --> 00:11:46,160 boundary. 167 00:11:46,190 --> 00:11:51,200 You'll also notice that our module script executed twice, like I said, once on the server and once 168 00:11:51,200 --> 00:11:51,830 on the client. 169 00:11:51,830 --> 00:11:57,810 And that's because this module script exists on two separate environments, or basically two different 170 00:11:57,810 --> 00:12:01,740 environments are requiring the module script, which is why it executed twice. 171 00:12:01,740 --> 00:12:06,660 One of the environments was on the server and the other environment was on this specific client. 172 00:12:06,660 --> 00:12:12,390 Now, as I mentioned earlier, module scripts are not limited to only returning tables. 173 00:12:12,390 --> 00:12:16,740 We can also return any other data type such as functions. 174 00:12:16,740 --> 00:12:22,720 So let's say we wanted to create some kind of general use function that any script in the game could 175 00:12:22,720 --> 00:12:24,820 use, because it's a pure function. 176 00:12:24,820 --> 00:12:32,500 And a pure function is simply the name given to a function that returns the exact same output when it's 177 00:12:32,500 --> 00:12:37,810 given the same input, and it does not rely on any external data. 178 00:12:37,810 --> 00:12:44,230 It's a fully encapsulated function, and encapsulated is another big word, but it basically means that 179 00:12:44,230 --> 00:12:50,260 the function is enclosed, like if you were to enclose something in a capsule and it does not interact 180 00:12:50,260 --> 00:12:52,660 with anything outside of the capsule. 181 00:12:52,660 --> 00:12:58,690 So instead what we're going to do here is we're going to have our module script return a function. 182 00:12:58,900 --> 00:13:04,540 So what we can go ahead and do is we can create a new function inside of here. 183 00:13:04,750 --> 00:13:07,570 I'm just going to call this example function. 184 00:13:08,110 --> 00:13:13,630 And instead of returning that table we're going to return example function. 185 00:13:13,630 --> 00:13:21,280 But we don't want to call example function because that's going to return the return value of this function. 186 00:13:21,280 --> 00:13:25,000 Instead we want to return a reference to this function. 187 00:13:25,000 --> 00:13:27,970 So that way other scripts can execute this function and use it. 188 00:13:28,030 --> 00:13:32,770 And inside of this function we can just print something like the function executed. 189 00:13:33,220 --> 00:13:34,660 We'll put a little smiley face. 190 00:13:35,500 --> 00:13:43,060 So now when I require my module script this variable is no longer storing a table, but instead it's 191 00:13:43,060 --> 00:13:44,650 storing a function. 192 00:13:44,650 --> 00:13:48,850 And that means I can call it like this. 193 00:13:49,120 --> 00:13:53,650 And then this local script is going to error because this module is no longer a table. 194 00:13:53,650 --> 00:13:56,320 So let me just get rid of this local script for now. 195 00:13:56,530 --> 00:14:00,690 And then let's go ahead and run the game and look at that. 196 00:14:00,690 --> 00:14:02,730 The function executed smiley face. 197 00:14:02,730 --> 00:14:09,150 Because my variable here is now storing a reference to this function that we returned from the module 198 00:14:09,150 --> 00:14:09,570 script. 199 00:14:09,570 --> 00:14:13,500 So this just proves that module scripts are not limited to tables. 200 00:14:13,500 --> 00:14:15,150 You can return other data types. 201 00:14:15,150 --> 00:14:21,240 Now we've just scratched the surface with the possibilities of module scripts, and you can do so much 202 00:14:21,240 --> 00:14:21,930 more with them. 203 00:14:21,930 --> 00:14:27,300 It just depends on the context of what you need and how you want to utilize modules. 204 00:14:27,300 --> 00:14:32,610 You could, for example, use a module script to create your own custom enum, and we'll be talking 205 00:14:32,610 --> 00:14:34,590 about enums in a future lecture. 206 00:14:34,590 --> 00:14:37,860 You could use a module script to act as a class. 207 00:14:37,860 --> 00:14:44,970 When you use object oriented programming, you could use a module script as a place to store settings 208 00:14:44,970 --> 00:14:50,750 in your game and share those settings across multiple scripts and so much more uses for module scripts. 209 00:14:50,750 --> 00:14:54,800 So let's go ahead and do a little bit of some practice with module scripts. 210 00:14:54,800 --> 00:15:00,350 So what I would like for you to do is I would like for you to create a new module script. 211 00:15:00,350 --> 00:15:03,620 And this module script is going to act as a calculator. 212 00:15:03,620 --> 00:15:07,250 So you could just call it like calculator module or something like that. 213 00:15:07,250 --> 00:15:10,550 And I want you to add four functions inside of it. 214 00:15:10,550 --> 00:15:16,190 One that adds, one that subtracts, one that multiplies, and one that divides. 215 00:15:16,190 --> 00:15:22,340 And for the division function, I want you to make sure that the user is not able to divide by zero. 216 00:15:22,340 --> 00:15:26,570 So all those functions should take two numbers as arguments. 217 00:15:26,570 --> 00:15:31,760 You could call it a and B, and each of those functions should do their own specific role. 218 00:15:31,760 --> 00:15:34,100 So one is going to add one is going to subtract. 219 00:15:34,100 --> 00:15:38,600 And this module should be usable across multiple different scripts. 220 00:15:38,600 --> 00:15:42,530 So please take a few minutes to work on this practice activity. 221 00:15:42,530 --> 00:15:46,100 And I will go ahead and show you my solution next okay. 222 00:15:46,100 --> 00:15:48,590 So let's go ahead and create a new module script. 223 00:15:48,590 --> 00:15:51,020 I'm just going to place mine in replicated storage. 224 00:15:51,020 --> 00:15:54,860 And I'm going to name this module my calculator. 225 00:15:55,280 --> 00:15:59,180 And then inside my module script I could just keep the variable name as module. 226 00:15:59,180 --> 00:16:02,330 But just to be consistent I'll call it calculator. 227 00:16:02,330 --> 00:16:05,540 And I need four functions inside of my calculator. 228 00:16:05,540 --> 00:16:11,690 So one of the functions is going to be an addition function that takes two numbers. 229 00:16:11,690 --> 00:16:12,860 I'll just call it a and b. 230 00:16:12,860 --> 00:16:19,190 And then we need three more functions one for subtraction, one for multiplication and one for division. 231 00:16:19,190 --> 00:16:21,590 So let me rename each of these functions. 232 00:16:21,590 --> 00:16:24,590 This one's going to be subtract. 233 00:16:24,590 --> 00:16:30,700 This one is going to be multiply and this one's going to be divide. 234 00:16:30,700 --> 00:16:34,630 And then we can just simply return the result of each of these operations. 235 00:16:34,630 --> 00:16:39,760 So for the addition we can just return a plus B subtraction. 236 00:16:39,760 --> 00:16:44,020 We can just return a minus b multiply. 237 00:16:44,020 --> 00:16:46,720 We can return a times b. 238 00:16:46,720 --> 00:16:54,460 And then for division we need to make sure that before we return A divided by B, we need to make sure 239 00:16:54,460 --> 00:16:56,170 that B is not zero. 240 00:16:56,170 --> 00:17:00,040 So let's go ahead and make a check real quick. 241 00:17:00,340 --> 00:17:09,700 And if B is equal to zero, which we don't want, then we can just return something. 242 00:17:09,700 --> 00:17:17,200 I mean you could return zero or maybe you could return a string like can't divide by zero, maybe something 243 00:17:17,200 --> 00:17:17,740 like that. 244 00:17:17,740 --> 00:17:22,330 Otherwise, if B is not equal to zero, we will return this operation here. 245 00:17:22,330 --> 00:17:29,170 So now if we go back to our server script and we go ahead and require this new calculator module script. 246 00:17:29,170 --> 00:17:33,550 So calculator I'll just call this variable my calculator. 247 00:17:34,240 --> 00:17:40,260 We should be able to use all of its functions like dividing adding multiplying and subtracting. 248 00:17:40,260 --> 00:17:41,580 So let's go ahead and try it out. 249 00:17:42,150 --> 00:17:46,530 Let's print the result of some division here. 250 00:17:47,670 --> 00:17:50,040 Let's just do five and ten. 251 00:17:50,040 --> 00:17:54,870 And then actually let's just copy this and do it for each function. 252 00:17:54,870 --> 00:17:57,120 So we'll do addition. 253 00:17:57,660 --> 00:17:59,640 We'll do subtraction. 254 00:17:59,670 --> 00:18:02,190 We'll do multiplication and division. 255 00:18:02,190 --> 00:18:08,610 And then if we go ahead and run the game, we get 15 -550 and 0.5. 256 00:18:08,610 --> 00:18:09,210 Awesome. 257 00:18:09,210 --> 00:18:15,030 And then if I try to divide by zero, hopefully we should get that string printed in the console. 258 00:18:15,030 --> 00:18:15,840 There you go. 259 00:18:15,840 --> 00:18:18,210 We cannot divide by zero. 260 00:18:18,210 --> 00:18:21,720 Now this is obviously not a very useful module. 261 00:18:21,720 --> 00:18:27,630 I mean, we could just simply use the mathematical operators without needing to create functions for 262 00:18:27,630 --> 00:18:27,920 them. 263 00:18:27,920 --> 00:18:33,860 But I just wanted this to serve as a practice problem with modules so you feel more comfortable using 264 00:18:33,860 --> 00:18:36,590 them and creating functions inside of them. 265 00:18:36,590 --> 00:18:39,920 So that's going to be all from me for this lecture. 266 00:18:39,920 --> 00:18:45,020 If you have any questions relating to this lecture, please make sure to join the discord so you can 267 00:18:45,020 --> 00:18:49,040 get quick support from me and other students and otherwise. 268 00:18:49,040 --> 00:18:52,100 Thank you for watching and I'll see you in the next lecture.